package com.tsll.entity;

import java.io.Serializable;

/**
 * 
 * @TableName directories
 */
public class Directories implements Serializable {
    /**
     * 章节id
     */
    private Integer id;

    /**
     * 标题
     */
    private String title;

    /**
     * 图书id
     */
    private Integer bookid;

    /**
     * 父级标题id
     */
    private Integer preid;

    /**
     * 章节内容
     */

    private  String content;

    private static final long serialVersionUID = 1L;

    /**
     * 章节id
     */
    public Integer getId() {
        return id;
    }

    /**
     * 章节id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 标题
     */
    public String getTitle() {
        return title;
    }

    /**
     * 标题
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * 图书id
     */
    public Integer getBookid() {
        return bookid;
    }

    /**
     * 图书id
     */
    public void setBookid(Integer bookid) {
        this.bookid = bookid;
    }

    /**
     * 父级标题id
     */
    public Integer getPreid() {
        return preid;
    }

    /**
     * 父级标题id
     */
    public void setPreid(Integer preid) {
        this.preid = preid;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }


    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Directories other = (Directories) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getBookid() == null ? other.getBookid() == null : this.getBookid().equals(other.getBookid()))
            && (this.getPreid() == null ? other.getPreid() == null : this.getPreid().equals(other.getPreid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getBookid() == null) ? 0 : getBookid().hashCode());
        result = prime * result + ((getPreid() == null) ? 0 : getPreid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", title=").append(title);
        sb.append(", bookid=").append(bookid);
        sb.append(", preid=").append(preid);
        sb.append(", content=").append(content);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}